package com.xxgc.demo.controller;

import com.xxgc.demo.controller.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:Sjy
 * @Date :2023/10/17 - 10 - 17 - 15:20
 * 负载均衡学习
 */
@Slf4j
@Tag(name = "负载均衡学习")
@RestController
public class NginxController {

    @Operation(summary = "负载均衡测试",description = "负载均衡测试")
    @GetMapping("/nginx/getMessage")
    public Result getMessage(){
        return Result.ok("192.168.0.151").msg("指定地址转发");
    }

    @Operation(summary = "负载均衡测试2",description = "负载均衡测试2")
    @GetMapping("/path/getMessage")
    public Result getMessage2(){
        return Result.ok("192.168.0.151").msg("正常情况");
    }

}
